﻿#region Using Directives

    using System;
    using System.Collections.Generic;

    using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Core.Criteria
{
    /// <summary>
    /// Criteria class that allows a profile to be uniquely identified by the username and profile type
    /// </summary>
    [Serializable]
    public class UserGUIDAndProfileTypeGUIDCriteria : CriteriaBase<UserGUIDAndProfileTypeGUIDCriteria>
    {

        #region Constructors

            /// <summary>
            /// Default constructor for this class
            /// </summary>
            /// <param name="userGUID">The UserGUID of the user to asscoiate with this criteria</param>  
            /// <param name="profileTypeGUID">The GUID of the type of the profile to asscoiate with this criteria</param> 
            public UserGUIDAndProfileTypeGUIDCriteria(Guid userGUID, Guid profileTypeGUID)
            {
                UserGUID = userGUID;
                ProfileTypeGUID = profileTypeGUID;
            }

        #endregion

        #region Properties

            /// <summary>
            /// This is the unique GUID used to identify the user being selected as part of this criteria
            /// </summary>
            public static PropertyInfo<Guid> UserGUIDProperty = RegisterProperty<Guid>(p => p.UserGUID);
            /// <summary>
            /// This is the unique GUID used to identify the user being selected as part of this criteria
            /// </summary>
            public Guid UserGUID
            {
                get { return ReadProperty(UserGUIDProperty); }
                private set { LoadProperty(UserGUIDProperty, value); }
            }

            /// <summary>
            /// The GUID of the profile type of the profile.
            /// </summary>
            public static PropertyInfo<Guid> ProfileTypeGUIDProperty = RegisterProperty<Guid>(p => p.ProfileTypeGUID);
            /// <summary>
            /// The GUID of the profile type of the profile.
            /// </summary>
            public Guid ProfileTypeGUID
            {
                get { return ReadProperty(ProfileTypeGUIDProperty); }
                set { LoadProperty(ProfileTypeGUIDProperty, value); }
            }

        #endregion

    }
}
